package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.sta.StaRoleDto;
import com.ysd.lis.dto.sta.StaRoleParam;
import com.ysd.lis.entity.sta.StaRole;
import com.ysd.lis.service.sta.StaRoleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * cold_chain.sys_module 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-12-18
 */
@Api(tags = "标准模型")
@RestController
@RequestMapping("/lis/sta/staRole")
public class StaRoleController extends BaseController {

    @Autowired
    StaRoleService staRoleService;
    @ApiOperation("不分页查询")
    @GetMapping("/findStaRoleList")
    public Result findStaRoleList(StaRoleParam param){
        return staRoleService.findStaRoleList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addStaRole")
    public Result addStaRole(@RequestBody StaRole staRole){
        return  staRoleService.addStaRole(staRole);
    }

    @ApiOperation("修改")
    @PostMapping("/editStaRole")
    public Result editStaRole(@RequestBody StaRole supplier) {
        return staRoleService.editStaRole(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteStaRoleList")
    public Result batchDeleteStaRoleList(@RequestBody StaRoleDto dto){
        return  staRoleService.batchDeleteStaRoleList(dto);
    }

}
